package com.bykj.property.mapper;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;

import com.bykj.property.controller.vo.request.PmVillagePageRequest;
import com.bykj.property.mapper.provider.PmUnitSql;
import com.bykj.property.mapper.provider.PmVillageSql;
import com.bykj.property.model.PmVillage;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.*;
import org.apache.ibatis.mapping.FetchType;

/**
* <p>
    * 小区信息表 Mapper 接口
    * </p>
*
* @author liangyiming
* @since 2019-06-20
*/
public interface PmVillageMapper extends BaseMapper<PmVillage> {

    @SelectProvider(type= PmVillageSql.class, method = "getSql")
                @Results({ @Result(property = "repairPersonId",column = "repair_person_id"),
                        @Result(property = "repairPerson",column = "repair_person_id",one = @One(select = "com.bykj.property.mapper.RepairPersonMapper.selectById"))
    })
    Page<PmVillage> queryPage(PmVillagePageRequest pageRequest);

}